home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib21b.dsk
/
FREE SECTOR CHART.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
2KB
|
50 lines
1 REM ************************
2 REM * FREE SECTOR CHART *
3 REM * BY DONALD JESSOP *
4 REM * COPYRIGHT (C) 1984 *
5 REM * BY MICRO-SPARC INC *
6 REM * LINCOLN, MA. 01773 *
7 REM ************************
10 REM ** LOAD IN RWTS SUBROUTINE **
20 FOR X = 896 TO 896 +30: READ D: POKE X,D: NEXT
30 DATA 169,3,160,138,32,217,3,96,0,0,1,96,1,0,17,0,153,3,0,32,0,0,1,0,0,96,1,0,1,239,216
40 A$ = "0123456789ABCDEF"
50 HOME : PRINT : PRINT "** COPYRIGHT 1984 BY MICROSPARC, INC. **"
60 INVERSE : HTAB 10: PRINT "FREE SECTOR CHART": NORMAL : PRINT
70 INPUT "WHAT IS THE NAME OF THE DISK? ";NA$
80 NA$ = "FREE SECTOR CHART FOR " +NA$
90 A = LEN(NA$): IF A <39 THEN GOTO 110: REM ** WE ARE CHECKING TO SEE IF THE TITLE CAN BE CENTERED PROPERLY **
100 NA$ = LEFT$(NA$,38)
110 PRINT "WOULD YOU ALSO LIKE A CATALOG OF THE DISK? ";: GET P$: PRINT P$
120 IF P$ = "Y" THEN PRINT CHR$(4)"CATALOG"
130 PRINT : INVERSE : PRINT "PRESS ANY KEY TO CONTINUE";: NORMAL : GET B$: PRINT B$
140 CALL 896: REM ** WE NOW READ IN THE VTOC **
150 REM ** DRAW BORDER FOR CHART **
160 HOME
170 VTAB 1: HTAB (38 - LEN(NA$))/2 +1: PRINT NA$
180 INVERSE
190 VTAB 3: HTAB 2: PRINT A$;A$; LEFT$(A$,3)
200 FOR X = 1 TO 16: VTAB 3 +X: HTAB 1: PRINT MID$ (A$,X,1);: NORMAL : PRINT SPC( 35);: INVERSE : PRINT MID$ (A$,X,1): NEXT
210 HTAB 2: PRINT A$;A$; LEFT$(A$,3)
220 NORMAL
230 REM ** DETERMINE WHICH SECTORS ARE FILLED **
240 H = 1:P = 0
250 FOR X = 8247 TO 8383 STEP 4
260 H = H +1
270 V = 20
280 P = P +1: IF P >16 THEN P = 1
290 VTAB V: HTAB H: FLASH : PRINT MID$ (A$,P,1);: NORMAL
300 FOR Y = 1 TO 2
310 A = PEEK(X +Y)
320 REM ** THIS LOOP EXTRACTS THE INFORMATION BIT BY BIT **
330 FOR T = 7 TO 0 STEP -1: REM ** WE STEP BACKWARD THROUGH THE BYTE **
340 V = V -1: VTAB V: HTAB H
350 IF A <(2 ^T) THEN PRINT "*"
360 IF A >(2 ^T) -1 THEN A = A -2 ^T:F = F +1
370 NEXT
380 NEXT
390 VTAB 20: HTAB H: INVERSE : PRINT MID$ (A$,P,1);
400 NEXT
410 NORMAL
420 VTAB 22: HTAB 1: PRINT "THERE ARE ";F;" FREE SECTORS"
430 END